package com.pi2e.view.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.pi2e.R;
import com.pi2e.view.base.BaseActivity;
import com.pi2e.view.common.FootView;
import com.pi2e.view.common.HeaderView;

public class HotelMainActivity extends BaseActivity implements OnClickListener {
	
	ImageView mImage01 ;
	ImageView mImage02 ;
	ImageView mImage03 ;
	LinearLayout line ;
	String flag = "" ;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		flag = getIntent().getStringExtra("FLAG") ;
		if ("Welcome".equals(flag)) {
			line.setVisibility(View.INVISIBLE);
		}
	}

	@Override
	public HeaderView initHeaderView() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setContentView() {
		setContentView(R.layout.activity_hotelmain);
		 line = (LinearLayout) findViewById(R.id.line ) ;
		

	}

	@Override
	public void initView() {
		mImage01 = (ImageView) findViewById(R.id.img_guide) ;
		mImage02 = (ImageView) findViewById(R.id.img_persons) ;
		mImage03 = (ImageView) findViewById(R.id.img_face) ;
		mImage01.setOnClickListener(this);
		mImage02.setOnClickListener(this);
		mImage03.setOnClickListener(this);

	}

	@Override
	public void initFootView() {
		FootView foot = new FootView(HotelMainActivity.this,findViewById(R.id.footId)) ;
		foot.getBtn_ok().setText("退 出");
		foot.getBtn_ok().setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish() ;
				
			}
		});

	}

	@Override
	public void onClick(View v) {
		int vid = v.getId() ;
		Intent it = null ;
		switch (vid) {
		case R.id.img_guide:
			it =  new Intent(HotelMainActivity.this,GuideVipActivity.class) ;
			startActivity(it);
			
			break;
		case R.id.img_persons:
		    it = new Intent(HotelMainActivity.this,TodayVipActivity.class) ;
			startActivity(it);
			break;
		case R.id.img_face:
			
			break;

		default:
			break;
		}
		
	}

}
